﻿// ******************************************************************
// * Copyright(c)  Steven Lu
// * Description   : Entity_BOM_STD_TECHNIC
// * CreateDate    : 2012/5/15 11:04:51
// * Creater       : CodeSmith
// * LastChangeDate: 2012/5/15 11:04:51
// * LastChanger   : 2012/5/15 11:04:51
// * Version Info  : 1.0 For ESOL
// ******************************************************************

using System;
using System.Data;
using System.Collections.Generic;
using System.Text;
using Suzsoft.Smart.EntityCore;
using ESOL.Common.Schema;

namespace ESOL.Common.Entity
{
    [Serializable]
    public partial class BomStdTechnicEntity : EntityBase
    {
        public BomStdTechnicTable TableSchema
        {
            get
            {
                return BomStdTechnicTable.Current;
            }
        }

        public BomStdTechnicEntity()
        {

        }

        public BomStdTechnicEntity(DataRow dr)
        {
            if (dr == null)
            {
                return;
            }
            this.BomTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_TECHNIC_ID"]));
            this.StationId = Convert.ToString(CommonFunctions.ToObject(dr["STATION_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.Sequence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQUENCE"]));
            this.StdWorkingTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["STD_WORKING_TIME"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public BomStdTechnicEntity(DataRowView dr)
        {
            if (dr == null)
            {
                return;
            }
            this.BomTechnicId = Convert.ToString(CommonFunctions.ToObject(dr["BOM_TECHNIC_ID"]));
            this.StationId = Convert.ToString(CommonFunctions.ToObject(dr["STATION_ID"]));
            this.ProductId = Convert.ToString(CommonFunctions.ToObject(dr["PRODUCT_ID"]));
            this.Sequence = Convert.ToInt32(CommonFunctions.ToObject(dr["SEQUENCE"]));
            this.StdWorkingTime = Convert.ToDecimal(CommonFunctions.ToObject(dr["STD_WORKING_TIME"]));
            this.Remark = Convert.ToString(CommonFunctions.ToObject(dr["REMARK"]));
        }

        public override TableInfo OringTableSchema
        {
            get
            {
                return BomStdTechnicTable.Current;
            }
        }

        #region Perporty List
        public string BomTechnicId
        {
            get { return Convert.ToString(GetData(BomStdTechnicTable.C_BOM_TECHNIC_ID)); }
            set { SetData(BomStdTechnicTable.C_BOM_TECHNIC_ID, value); }
        }

        public string StationId
        {
            get { return Convert.ToString(GetData(BomStdTechnicTable.C_STATION_ID)); }
            set { SetData(BomStdTechnicTable.C_STATION_ID, value); }
        }

        public string ProductId
        {
            get { return Convert.ToString(GetData(BomStdTechnicTable.C_PRODUCT_ID)); }
            set { SetData(BomStdTechnicTable.C_PRODUCT_ID, value); }
        }

        public int Sequence
        {
            get { return Convert.ToInt32(GetData(BomStdTechnicTable.C_SEQUENCE)); }
            set { SetData(BomStdTechnicTable.C_SEQUENCE, value); }
        }

        public decimal StdWorkingTime
        {
            get { return Convert.ToDecimal(GetData(BomStdTechnicTable.C_STD_WORKING_TIME)); }
            set { SetData(BomStdTechnicTable.C_STD_WORKING_TIME, value); }
        }

        public string Remark
        {
            get { return Convert.ToString(GetData(BomStdTechnicTable.C_REMARK)); }
            set { SetData(BomStdTechnicTable.C_REMARK, value); }
        }

        #endregion
    }


}

